eeprom15 2.2.1
Loading...
Searching...
No Matches
EEPROM 15 Click Driver

API for configuring and manipulating EEPROM 15 Click driver. More...

Topics

 EEPROM 15 Registers List
 List of registers of EEPROM 15 Click driver.
 EEPROM 15 Registers Settings
 Settings for registers of EEPROM 15 Click driver.
 EEPROM 15 MikroBUS Map
 MikroBUS pin mapping of EEPROM 15 Click driver.

Functions

void eeprom15_cfg_setup (eeprom15_cfg_t *cfg)
 EEPROM 15 configuration object setup function.
err_t eeprom15_init (eeprom15_t *ctx, eeprom15_cfg_t *cfg)
 EEPROM 15 initialization function.
err_t eeprom15_write_memory (eeprom15_t *ctx, uint8_t address, uint8_t *data_in, uint8_t len)
 EEPROM 15 Write Memory function.
err_t eeprom15_read_memory (eeprom15_t *ctx, uint8_t address, uint8_t *data_out, uint16_t len)
 EEPROM 15 Read Memory function.
void eeprom15_set_wp_pin (eeprom15_t *ctx, uint8_t state)
 EEPROM 15 Set Write Protection Pin function.
err_t eeprom15_select_bank (eeprom15_t *ctx, uint8_t bank_sel)
 EEPROM 15 Select Memory Bank function.
err_t eeprom15_set_wp_block (eeprom15_t *ctx, uint8_t block_num)
 EEPROM 15 Set Write Protection Block function.
err_t eeprom15_clear_wp (eeprom15_t *ctx)
 EEPROM 15 Clear Write Protection function.

Detailed Description

API for configuring and manipulating EEPROM 15 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ eeprom15_cfg_setup()

void eeprom15_cfg_setup ( eeprom15_cfg_t * cfg)

EEPROM 15 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See eeprom15_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ eeprom15_clear_wp()

err_t eeprom15_clear_wp ( eeprom15_t * ctx)

EEPROM 15 Clear Write Protection function.

This function clears all write protection settings in the EEPROM.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
A0 pin must be tied to Vhv (Very High Voltage: 7V to 10V).

◆ eeprom15_init()

err_t eeprom15_init ( eeprom15_t * ctx,
eeprom15_cfg_t * cfg )

EEPROM 15 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See eeprom15_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom15_read_memory()

err_t eeprom15_read_memory ( eeprom15_t * ctx,
uint8_t address,
uint8_t * data_out,
uint16_t len )

EEPROM 15 Read Memory function.

This function reads data from the EEPROM memory starting from the specified address.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]address: Start address in EEPROM memory.
[out]data_out: Pointer to the buffer to store read data.
[in]len: Number of bytes to read (up to 256).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ eeprom15_select_bank()

err_t eeprom15_select_bank ( eeprom15_t * ctx,
uint8_t bank_sel )

EEPROM 15 Select Memory Bank function.

This function selects the active memory bank in the EEPROM.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]bank_sel: Memory bank selection (0 or 1).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ eeprom15_set_wp_block()

err_t eeprom15_set_wp_block ( eeprom15_t * ctx,
uint8_t block_num )

EEPROM 15 Set Write Protection Block function.

This function enables write protection for a specific memory block.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]block_num: Write protection block selection (0-3).
Returns
  • 0 - Success,
  • -1 - Error.
Note
A0 pin must be tied to Vhv (Very High Voltage: 7V to 10V).

◆ eeprom15_set_wp_pin()

void eeprom15_set_wp_pin ( eeprom15_t * ctx,
uint8_t state )

EEPROM 15 Set Write Protection Pin function.

This function sets the state of the write protection (WP) pin.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]state: Pin state (0 - LOW, 1 - HIGH).
Note
Write Protection pin is active high.

◆ eeprom15_write_memory()

err_t eeprom15_write_memory ( eeprom15_t * ctx,
uint8_t address,
uint8_t * data_in,
uint8_t len )

EEPROM 15 Write Memory function.

This function writes data to the EEPROM memory starting from the specified address.

Parameters
[in]ctx: Click context object. See eeprom15_t object definition for detailed explanation.
[in]address: Start address in EEPROM memory.
[in]data_in: Pointer to the data to be written.
[in]len: Number of bytes to write (up to 16).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.